package com.ethan.java8;

import java.util.Arrays;
import java.util.List;

/**
 * @author ethan
 * create 2018-08-03 上午9:58
 * desc
 **/
public class Test1 {
    //http://www.open-open.com/lib/view/open1403232177575.html#lambdaAndFunctional
    public static void main(String[] args) {
        // Lambda表达式与Functional接口
        Arrays.asList("a", "b", "c").forEach(e -> System.out.println(e));

        Arrays.asList("a", "b", "d").forEach((String e) -> System.out.println(e));

        String separator = ",";
        Arrays.asList("a", "b", "").forEach((String e) -> System.out.println(e + separator));

        List<String> list = Arrays.asList("a","d","c");
        list.sort(String::compareTo);

        String a="";
    }
}
